package com.wanmait.deliverymangementsystem.managecontroller;

import com.github.pagehelper.PageInfo;
import com.wanmait.deliverymangementsystem.pojo.Reviews;
import com.wanmait.deliverymangementsystem.service.ReviewsService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("/manage")
public class ManageReviewController {
    @Resource
    private ReviewsService reviewsService;
    @GetMapping("reviewList")
    @ModelAttribute("reviewsPageInfo")
    public PageInfo<Reviews> reviewList(Integer page){
      PageInfo<Reviews> reviewsPageInfo=  reviewsService.findAll(page);
        return reviewsPageInfo;
    }
}
